<template>
<table class="table table-bordered">
    <thead>
        <tr>
            <td>房间类型</td>
            <td>房间价格</td>
            <td>押金</td>
            <td>设置时间</td>
            <td>状态</td>
            <td>操作</td>
        </tr>
    </thead>
    <tbody>
        <tr v-for="item in info">
            <td>{{ item.roomType }}</td>
            <td>{{ item.price }}</td>
            <td>{{ item.money }}</td>
            <td>{{ item.rtime.substring(0,10) }}</td>
            <td>{{ item.rstate?"投放":"不投放" }}</td>
            <td>操作</td>
        </tr>
    </tbody>
</table>
</template>
<script setup lang="ts">
import {ref,onMounted} from 'vue'
import axios from 'axios'


const info=ref([{
    rMid:0,
    roomType:'',
    price:'',
    money:'',
    rtime:'',
    rstate:true
}])
onMounted(()=>{
    Show()
})
const Show=()=>{
    axios.get('https://localhost:7137/api/Work/RoomShow')
    .then(res=>{
        info.value = res.data
    })
}




</script>